<template>
	<div id="app"><router-view /></div>
</template>

<script>
import api from '@/api';
export default {
	name: 'App',
	created() {
		this.configAPI();
		this.FormRule.thisVm(this);
	},
	methods: {
		configAPI() {
			let arr = [];
			for (let key in api) {
				arr.push(this.getUrl(api[key]));
			}
			console.log(arr);
		},
		getUrl(fn) {
			let url = fn.toString().match(/(?<=[post|get]\(['"])(.*)(?=['"])/)[1];
			return url;
		}
	}
};
</script>
